package com.zx.article.typePay.service.impl;

import java.util.List;

import com.zx.article.typePay.dao.ITypePayDao;
import com.zx.article.typePay.dao.impl.TypePayDaoImpl;
import com.zx.article.typePay.model.TypePayModel;
import com.zx.article.typePay.service.ITypePayService;

public class TypePayServiceImpl implements ITypePayService {

	private ITypePayDao typePayDao = new TypePayDaoImpl();

	@Override
	public String addId(String article) {
		return typePayDao.insertId(article);
	}

	@Override
	public int getCount(TypePayModel typePayModel) {
		return typePayDao.getCount(typePayModel);
	}

	@Override
	public List<TypePayModel> get(TypePayModel typePayModel) {
		return typePayDao.queryList(typePayModel);
	}

	@Override
	public TypePayModel getModel(String article) {
		return typePayDao.queryModel(article);
	}

	@Override
	public String upd(TypePayModel typePayModel) {
		return "1".equals(typePayDao.updata(typePayModel)) ? "success" : "fail";
	}

}
